// 盘点管理
import request from "@/api/request";

// 产生盘点单
// 新增产生盘点单
export const add_produceBlitem = (params) => {
  return request({
    url: "/equipmentmanage/pc/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询仓库列表
export const query_warehouse = (params) => {
  return request({
    url: "/equipmentmanage/pc/depotList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};


// 查询部门列表
export const query_orgList = (params) => {
  return request({
    url: "/equipmentmanage/pc/orgList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};


// 器材盘点单
// 分页查询器材盘点单
export const query_equipmentBlitem = (params) => {
  return request({
    url: "/equipmentmanage/ec/selectAll",
    method: "post",
    data: params,
  });
};
// 新增器材盘点单
export const add_equipmentBlitem = (params) => {
  return request({
    url: "/equipmentmanage/ec/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 逻辑删除器材盘点单
export const delete_equipmentBlitem = (params) => {
  return request({
    url: `/equipmentmanage/ec/delete/${params}`,
    method: "post",
    data: params,
  });
};

// 修改器材盘点单
export const update_equipmentBlitem = (params) => {
  return request({
    url: "/equipmentmanage/ec/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询器材盘点单详情
export const select_equipmentBlitemDetails = (params) => {
  return request({
    url: `/equipmentmanage/ec/selectDetails/${params}`,
    method: "post",
    data: params,
  });
};

// 删除子表
export const delete_qclist = (params) => {
  return request({
    url: `/equipmentmanage/ec/deleteCheckDtl/${params}`,
    method: "post",
    data: params,
  });
};

// 提交
export const submit_qclist = (params) => {
  return request({
    url: '/equipmentmanage/ec/commit',
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 审核
export const audit_qclist = (params) => {
  return request({
    url: '/equipmentmanage/ec/audit',
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 审核历史
export const history_qclist = (params) => {
  return request({
    url: '/equipmentmanage/ec/getAuditHistory',
    method: "post",
    data: params,
  });
}

// 回退
export const undo_qclist = (params) => {
  return request({
    url: '/equipmentmanage/ec/undo',
    method: "post",
    data: params,
  });
}

// 作废
export const cancel_qclist = (params) => {
  return request({
    url: '/equipmentmanage/ec/cancel',
    method: "post",
    data: params,
  });
}